<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>刷底色</title>
</head>
<body>
<canvas></canvas>
<script type="module">
    import { Color } from "https://unpkg.com/three/build/three.module.js";
    const canvas = document.querySelector('canvas')
    const gl = canvas.getContext('webgl')
    gl.clearColor(0,1,1,1)
    gl.clear(gl.COLOR_BUFFER_BIT)



    const color = new Color(1,0,0)

    !(function ani() {
        color.offsetHSL(0.005, 0, 0)
        gl.clearColor(color.r,color.g,color.b,1)
        gl.clear(gl.COLOR_BUFFER_BIT)
        requestAnimationFrame(ani)
    })()


</script>
</body>
</html>
